package week2;

import org.junit.Test;

public class StaticDemo {
    public static int num = 1;
    public int num1 = 2;

    public StaticDemo() {
    }

    public StaticDemo(int num, int num1) {
        this.num = num;
        this.num1 = num1;
    }

    @Override
    public String toString() {
        return "StaticDemo{" +
                "num=" + num +
                ", num1=" + num1 +
                '}';
    }

    public static void main(String[] args) {
        StaticDemo staticDemo = new StaticDemo(3,8);
        String str = staticDemo.toString();
        System.out.println(str);
        StaticDemo.num = 9;
        System.out.println(num);
        staticDemo.num1 = 4;
        System.out.println(staticDemo.num1);

    }

    @Test
    public void t1(){

    }
}



class AA{
    @Test
    public void t1(){
        StaticDemo staticDemo = new StaticDemo();
        System.out.println(staticDemo.num1);
    }
}